package com.dss.Service;

import com.dss.Dao.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

/**
 * @author name:dss
 * @version 1.0
 * @description: TODO
 * @date 2022/8/222022/8/22
 */
@Service
public class UserServiceimpl implements UserService {

    //Field注入
    @Qualifier("userDaoimpl2")
    @Autowired
    private UserDao userDao;


    //set注入
    //private UserDao userDao;
    //@Autowired
    //public void SetUserDao(@Qualifier("userDaoimpl") UserDao userDao) {
      //  this.userDao = userDao;
    //}

    //构造器注入
    //private final UserDao userDao;
    //@Autowired
    //public UserServiceimpl(@Qualifier("userDaoimpl") UserDao userDao) {
      //  this.userDao = userDao;
    //}

    public void modifyUserinfo() {
        userDao.update();
        userDao.add();
    }
}
